home *** CD-ROM | disk | FTP | other *** search
- /* Copyright, 1990, Regents of the University of Colorado */
- /* This program prints out messages from two composite procedures, inside of
- * two different one dimensional environment structures. */
-
- #define P1 8
- #define P2 6
-
- environment node1[P1:id] {
-
- composite part1()
- {
- printf ("node1[%d] says hello from part1()#\n", id);
- }
-
- }
-
- environment node2[P2:id] { /* ==> Multiple environment structures are
- allowed, and are simply declared one
- after another. */
-
- composite part2()
- {
- printf ("node2[%d] says hello from part2()#\n", id);
- }
-
- }
-
- environment host {
-
- void main ()
- {
- printf ("host says hello\n");
-
- part1()#;
- part2()#; /*==> Part1()# must finish before Part2()#
- begins execution. */
-
- printf ("host says goodbye\n");
- }
- }
-